home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12217 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  36 lines

  1. Newsgroups: comp.lang.c
  2. Path: in2.uu.net!docws001!ottnews!usenet
  3. From: 75323.455@compuserve.com (Bruce Coghill)
  4. Subject: routine for yesterday's date
  5. X-Nntp-Posting-Host: 159.249.6.78
  6. Message-ID: <315c4d0f.19874776@ottnews.shl.com>
  7. Sender: usenet@ottnews.shl.com (News Administrator)
  8. Reply-To: 75323.455@compuserve.com
  9. Organization: SHL Systemhouse Inc. (Ottawa)
  10. X-Newsreader: Forte Agent .99d/16.182
  11. Date: Fri, 29 Mar 1996 20:51:41 GMT
  12.  
  13. Greetings,
  14.  
  15. In many languages you can specify (reference) a relative date.  To
  16. find out yesterday's address, In Sybase, for example it is something
  17. like dayadd(-1).  In dBase you just say "yesterday" in the assignment
  18. statement.  In my C manual the time.h and time functions are described
  19. and how I can pull off each element in the structure (like year,
  20. month, day, day-of-the-year), but it isn't clear to me how to subtract
  21. a day.  In its 19960329 (format yyymmdd), it is easy.  But what about
  22. 19960401?  I do have a function that converts a date to julian, but
  23. not the other way.
  24.  
  25. Does anyone know of a library function that will give my yesterday's
  26. date automatically?  Has anyone written such a routine?  Sincerely,
  27.  
  28. Bruce Coghill
  29. writing at 2:48 PM, 
  30. on Friday, March 29, 1996
  31.  
  32. Bruce...                  :=}
  33.  
  34. ** ++ -> The thoughts expressed above are my own.   <- ++ **
  35. ** ++ -> An open mind is one, that can grow.        <- ++ **
  36.